From: Florian Müllner Date: Tue, 22 Feb 2022 20:16:52 +0000 (+0100) Subject: workspaceAnimation: Fix warning on restacking X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~516^2^2~45 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=5d1b9a429e11260fed2d0064629452a6bcda73ad;p=gnome-shell.git workspaceAnimation: Fix warning on restacking Only workspace groups that are associated with a workspace have a background. As a result, when restacking window previews we end up passing `undefined` to clutter_actor_set_child_above_sibling() instead of null, triggering a warning. Part-of: --- diff --git a/js/ui/workspaceAnimation.js b/js/ui/workspaceAnimation.js index f61afe323..25144ab3a 100644 --- a/js/ui/workspaceAnimation.js +++ b/js/ui/workspaceAnimation.js @@ -73,11 +73,13 @@ class WorkspaceGroup extends Clutter.Actor { this._shouldShowWindow(w.meta_window)); let lastRecord; + const bottomActor = this._background ?? null; for (const windowActor of windowActors) { const record = this._windowRecords.find(r => r.windowActor === windowActor); - this.set_child_above_sibling(record.clone, lastRecord ? lastRecord.clone : this._background); + this.set_child_above_sibling(record.clone, + lastRecord ? lastRecord.clone : bottomActor); lastRecord = record; } }